In [38]:
    
import plotly.graph_objs as go 
from plotly.offline import init_notebook_mode,iplot
init_notebook_mode(connected=True)
    
Import pandas and read the csv file: 2014_World_Power_Consumption
In [1]:
    
    
In [152]:
    
    
Check the head of the DataFrame.
In [156]:
    
    
    Out[156]:
Referencing the lecture notes, create a Choropleth Plot of the Power Consumption for Countries using the data and layout dictionary.
In [ ]:
    
    
In [ ]:
    
choromap = go.Figure(data = [data],layout = layout)
iplot(choromap,validate=False)
    
In [109]:
    
    
Check the head of the DataFrame.
In [110]:
    
    
    Out[110]:
Now create a plot that displays the Voting-Age Population (VAP) per state. If you later want to play around with other columns, make sure you consider their data type. VAP has already been transformed to a float for you.
In [120]:
    
    
In [121]:
    
    
In [ ]:
    
choromap = go.Figure(data = [data],layout = layout)
iplot(choromap,validate=False)